import { JSONMapping } from "../../json-mapping";
import { SyncStatus } from "../../sync-status";
import { ObjectDtoInterface } from "../../../services/sqliteDB/object.dto";

export class WorkTicket extends JSONMapping implements ObjectDtoInterface {
    static PropertyKeyToJSONKeyMap() {
        return {
            taskId: "planId",
            content: "contents"
        };
    }


    public id: string = null;       // 索引列
    public taskId: string = null;   // 检修ID
    public content: string = null;        // 内容
    public syncStatus: SyncStatus = SyncStatus.None;         // 同步状态：   （0: 从来没上传, 1: 上传成功, 2: 正在上传, 3: 上传失败)


    constructor(json: { [key: string]: any }) {
        super(json);
        WorkTicket.mapFromJSON(json, this);
    }
}
